// 自动上传代码到服务器
let client = require('scp2')
client.scp('./dist', {
    host: '121.41.46.250',
    username: 'root',
    port: 22000,
    password: 'yzhyzh.250',
    path: '/opt/www/web/yzh.user'
}, function (err) {
    if (err) {
        console.log(err)
    } else {
        console.log('成功上传到121.41.46.250')
        client.scp('./dist', {
            host: '121.41.47.163',
            username: 'root',
            port: 22000,
            password: 'yzhyzh.163',
            path: '/opt/www/web/yzh.user'
        }, function (err) {
            if (err) {
                console.log(err)
            } else {
                console.log('成功上传到121.41.47.163')
                client.scp('./dist', {
                    host: '121.41.3.10',
                    username: 'root',
                    port: 22000,
                    password: 'yzhyzh.10',
                    path: '/opt/www/web/yzh.user'
                }, function (err) {
                    if (err) {
                        console.log(err)
                    } else {
                        console.log('成功上传到：121.41.3.10服务器')
                    }
                })
            }
        })
    }
})
